﻿@model IEnumerable<OJS.Web.ViewModels.News.SelectedNewsViewModel>
@using Resource = Resources.News.Views.LatestNews           

<div>
    @if (!Model.Any())
    {
        <p>@Resource.No_news.</p>
    }
    else
    {
        <table class="table table-hover">
            @foreach (var news in Model)
            {
                <tr>
                    <td class="text-left">
                        <a href="/News/Selected/@news.Id">@news.Title</a>
                        <p class="text-right">@news.TimeCreated.ToString("dd/MM/yyyy")</p>
                    </td>
                </tr>
            }
        </table>
        <p class="pull-right"><a class="btn btn-default" href="/News/All">@Resource.See_more &raquo;</a></p>
    }
    @if (User.IsAdmin())
    {
        <p class="pull-left"><a class="btn btn-primary" href="/Administration/News">@Resource.Administration &raquo;</a></p>
    }
</div>
